package com.nineshadow.games.Enum;

import lombok.Getter;

@Getter
public enum TypeEnum {
    SCORE(0,"积分"),
    COINS(1,"金币")
    ;

    private int code;

    private String msg;

    TypeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static TypeEnum getByCode(int code) {
        for (TypeEnum anEnum : values()) {
            if (anEnum.code == code) {
                return anEnum;
            }
        }
        return null;
    }
}
